interface ComputePower{
    double computePower();
}
class Chip implements ComputePower{
    @Override
    public double computePower() {
        return 16.6;
    }
}
class Discrete implements ComputePower {
    @Override
    public double computePower() {
        return 40.0;
    }
}
class Phone{
    private ComputePower[] parts;
    public Phone(ComputePower[] parts) {
        this.parts = parts;
    }

    double getTotalPower(){
        double sum = 0;
        for (int i = 0; i < parts.length; i++) {
            sum += parts[i].computePower();
        }
        return sum;
    }
}